package aom.ju.ss.mode


data class nearbyShops(
    val code: Int,
    val `data`: List<Shop>?,
    val msg: String,
    val url: String
)


data class Shop(
    val address: String,
    val address_info: String,
    val id: String,
    val lat: String?,
    val lng: String?,
    val sale_num: Int,
    val shengshiqu: String,
    val name: String,
    val street_id: Int,


    val audit_status_text: String,
    val business_hours: String,
    val desc: String,
    val earnest_status_text: String,
    val image: String,
    val logo: String,
    val phone: String,
    val region_info: String,
    val status_text: String,
    val is_live: Int

) {

    var sales: String? = ""
        get() {
            if (field == null) {
                field = "0"
            }
            return field
        }


    var shop_picp0: String? = ""
        get() {
            if (image != null && image.contains(",") && image.split(",").size > 1) {
                for (a in image.split(",")) {
                    if (a.contains("http")) {
                        field = a
                        return field
                    }
                }
            }
            if (field == null) {
                field = ""
            }

            return field
        }

}